package com.example.testapplication.work

import android.content.Context
import android.util.Log
import androidx.annotation.NonNull
import androidx.work.Worker
import androidx.work.WorkerParameters

/**
 *@Date: 2022/7/4 14:45
 */
class BlurWorker(@NonNull context: Context, @NonNull workerParams: WorkerParameters) : Worker(context, workerParams) {

    private var th = true
    private var ii = 0

    override fun doWork(): Result {
        val data = inputData.getString("data20")
        ii++
        Log.e("BlurWorker", "这事我干完了--$ii-->$data -- ${System.currentTimeMillis()}")
        Thread.sleep(1000)
        return Result.success()
    }
}